<template>
    <div class="basic-info">
        <h2>基本信息</h2>
        <table>
            <tr>
                <td>企业名称</td>
                <td>{{ company.name }}</td>
                <td>登录账号</td>
                <td>{{ company.loginAccount }}</td>
            </tr>
            <tr>
                <td>账号状态</td>
                <td>{{ company.accountStatus === 0 ? "正常" : "冻结" }}</td>
                <td>接单状态</td>
                <td>{{ company.orderStatus === 0 ? "接单中" : "休息中" }}</td>
            </tr>
            <tr>
                <td>认证状态</td>
                <td>{{ company.certificationStatus }}</td>
                <td>认证时间</td>
                <td>{{ company.certificationTime }}</td>
            </tr>
            <!-- <tr>
                <td>接单状态</td>
                <td>{{ company.orderStatus }}</td>
                <td>综合评分</td>
                <td>5.0</td>
            </tr>
            <tr>
                <td>账号状态</td>
                <td>{{ company.accountStatus }}</td>
                <td>认证时间</td>
                <td>{{ company.certificationTime }}</td>
            </tr> -->
        </table>
    </div>
</template>

<script>
import { getInformation } from '@/api/information/information';
export default {
    name: 'BasicInfo',
    props: {
        id: {
            type: Number,
            required: true
        }
    },
    data() {
        return {
            company: {
            }
        };
    },
    created() {
        console.log(this.id);

    },
    mounted() {
        this.getInfo();
    },
    methods: {
        getInfo() {
            getInformation(this.id).then(res => {
                console.log(res);
                this.company = res.data;
            });
        },

    }
};
</script>

<style scoped>
.basic-info {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

td {
    padding: 8px;
    border: 1px solid #ddd;
}

.status-active {
    color: green;
}

.status-inactive {
    color: red;
}
</style>